T6962: frr: fix wrong kernel routes updates - #1029
Merged
Merged
Conversation
|
👍 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where FRR (Free Range Routing) incorrectly handles kernel route updates when the last IPv4 address is deleted from an interface. The Linux kernel deletes IPv4 routes when the last interface IPv4 address is removed but doesn't send RTM_DELROUTE notifications, causing FRR's routing table to become out of sync with the kernel.
Key changes:
- Adds new enum value
RIB_UPDATE_KERNEL_LAST_ADDRESS_DELETEDfor tracking last address deletion events - Implements function
if_has_connected_with_family()to check for addresses of a specific family on an interface - Updates route handling logic to properly detect and handle last IPv4 address deletion scenarios
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sever-sever
approved these changes
Sep 15, 2025
sever-sever
left a comment
Member
There was a problem hiding this comment.
Fix for zebra to for updated kernel routes
The patch 0007-zebra-remove-kernel-route-on-last-address-deletion.patch fixes root cause of the issue: Zebra didn't do anything on last IPv4 address deletion though kernel in such case deletes all IPv4 routes. FRR PR: FRRouting/frr#19564
hedrok
force-pushed
the
T6962-frr-zebra-kernel-routes
branch
from
September 15, 2025 08:35
8f78735 to
4fbffe2
Compare
dmbaturin
approved these changes
Sep 16, 2025
dmbaturin
left a comment
Member
There was a problem hiding this comment.
I trust Kyrylo's and Viacheslav's judgement and the code looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FRR: Fix wrong kernel routes updates
The patch 0007-zebra-remove-kernel-route-on-last-address-deletion.patch fixes root cause of the issue: Zebra didn't do anything on last IPv4 address deletion though kernel in such case deletes all IPv4 routes.
FRR PR: FRRouting/frr#19564
I'm pretty confident in the patch, I've added topotest case, PR passed almost all topotests (I've checked that failed ones fail in other PRs as well and they really seem to have nothing to do with my changes).
As the issue is non-critical we can wait for FRR reaction to be sure not to break something.
Types of changes
Related Task(s)
Related PR(s)
Checklist: